// Copyright 2006 Mloofle Inc. All Rights Reserved.

/**
 * Represents a user-level command.
 */
public interface Command {

  /**
   * Accepts and executes the given commandLine if it matches this object.
   * 
   * @param corpus the active corpus
   * @param args any arguments to the command
   * @return <code>true</code> if this object processed the command, otherwise
   *         <code>false</code>
   */
  boolean accept(Corpus corpus, String[] args);

  /**
   * @return the name of this command
   */
  String getName();

}
